// globals
float4x4	gWVP;
texture groundTex;

sampler		samp1
{
	Texture = <groundTex>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = LINEAR;
	BorderColor = {1.0f, 0.0f, 1.0f, 1.0f};

	AddressU = BORDER;
	AddressV = BORDER;
};
	
// Define a vertex shader output structure;
struct OutputVS
{
    float4 posH:POSITION0;
    float2 texCoord0:TEXCOORD0;
};

// Vertex shader -------------------------------------------------------------------------------------
OutputVS TransformVS(float3 position:POSITION0, float2 uv0:TEXCOORD0)
{
	// output structure
	OutputVS outVS;
	
	//TODO:scale position before transforming by the gWVP
	//position *= fScale;
	
	outVS.posH = mul(float4(position, 1.0f), gWVP);	
	outVS.texCoord0 = uv0;
	
    return outVS;
}

// Pixel Shader ---------------------------------------------------------------------------
float4 TransformPS(float2 uv0:TEXCOORD0):COLOR
{
	//TODO:return the global color set already
	float4 texCol = tex2D(samp1, uv0);
	return texCol;
}

// ----------------------------------------------------------------------------------------
technique Basic
{
    pass P0
    {
        vertexShader = compile vs_2_0 TransformVS();
        pixelShader  = compile ps_2_0 TransformPS();
      
		//AlphaBlendEnable = false;
		//SrcBlend = srcAlpha;
		//DestBlend = One;
        //FillMode = Wireframe;
        //CullMode = NONE;
		ShadeMode = Gouraud;
    }
}